package cn.bdqn.hospital.dao;

import cn.bdqn.hospital.entity.TheOrder;

import java.sql.SQLException;
import java.util.List;

/**
 * 订单详情表dao层接口
 */
public interface TheOrderDao {

    /**
     * 新增订单详情表
     * @param theOrder
     * @return
     * @throws SQLException
     */
    public int add(TheOrder theOrder)throws SQLException;

    /**
     * 修改订单详情
     * @param theOrder
     * @return
     * @throws SQLException
     */
    public int update(TheOrder theOrder)throws SQLException;

    /**
     * 通过订单详情id删除订单详情
     * @param ddId
     * @return
     * @throws SQLException
     */
    public int delete(Integer ddId)throws SQLException;

    /**
     * 查询所有订单详情
     * @return
     * @throws SQLException
     */
    public List<TheOrder> getAll()throws SQLException;

    /**
     * 通过员工id查询订单详情
     * @return
     * @throws SQLException
     */
    public List<TheOrder> getTheOrderByYgId(Integer ygId)throws SQLException;

    /**
     * 通过患者id查询订单详情
     * @return
     * @throws SQLException
     */
    public List<TheOrder> getTheOrderByHzId(Integer hzId)throws SQLException;

    /**
     * 通过订单总表id查询下面的所有详情订单
     * @param ddzId
     * @return
     * @throws SQLException
     */
    public List<TheOrder> getTheOrderByDdzId(Integer ddzId) throws SQLException;

    /**
     * 通过详情订单的id查询订单
     * @return
     * @throws SQLException
     */
    public TheOrder getTheOrderInfoByddid(Integer ddId)throws SQLException;

}
